package com.matt.docpro.model;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * Patient
 * Created by  on 2024/02/20.
 */
@Data
public class Patient {
    String id;
    String name;
    String icon;
    String gender;
    Date birth;
    int age;
    String address;
    String phone;
    String mail;
    String blood;
    String intro;

    public String getFormatGender() {
        if (gender == null) {
            return "";
        }
        return gender.equals("1") ? "男" : "女";
    }

    public String getFormatBirth() {
        if (birth == null) {
            return "";
        }
        return DateUtil.format(birth, "yyyy/MM/dd");
    }
}
